﻿@model IEnumerable<ITProject.WebUI.Models.ProjectAdmin.ProjectAdminProjectReleaseViewModel>
@{
    ViewBag.Title = "Wersje projektu";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Panel administracyjny projektu @ViewData["projectName"].ToString()</h2>




<div class="Pmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectMenuControl,
new ITProject.WebUI.Models.Project.ProjectMenuViewModel { ProjectName = ViewData["ProjectName"].ToString(), Role = ITProject.Domain.UserRole.Supervisor })
</div>



<div class="PAmenu">
@Html.Partial(MVC.Shared.Views.Partials._ProjectAdminMenu, new List<string> { "WP", ViewData["ProjectName"].ToString() })
@*@Html.ActionLink("Zarządzaj użytkownikami",MVC.ProjectAdmin.ActionNames.ManageTeam, MVC.ProjectAdmin.Name, new { projectName = Model }, null)*@
</div>
<div class="PAplane"> 
<span class="button" id="TSortAsc">Sortowanie A-Z</span>
<span class="button" id="TSortDesc">Sortowanie Z-A</span>
<p class="small">
Wyszukaj: @Html.TextBox("szukaj", null, new { @id = "Tsearch", @class="search"})
</p>
<div class="teamy">    
<table width="100%" class="inbox" id="teams">
<thead>
<tr>
<th class="label" width="30%">Nazwa</th>
<th class="label" width="20%">Status</th>
<th class="label" width="50%">Opcje</th>
</tr>
</thead>
<tbody>
@foreach (ITProject.WebUI.Models.ProjectAdmin.ProjectAdminProjectReleaseViewModel item in Model)
{
<tr>
<td class="edit">@Html.DisplayFor(items=>item.Name) </td>
<td class="edit">@Html.DisplayFor(items=>item.ReleaseStatus)</td>
<td class="edit">
@Html.ActionLink("Zmień status", MVC.ProjectAdmin.ActionNames.ChangeReleaseStatus, MVC.ProjectAdmin.Name, new { projectName = ViewData["ProjectName"].ToString(), releaseName=item.Name,currentReleaseStatus=item.ReleaseStatus }, new { @class="button" })
@Html.ActionLink("Edytuj", MVC.ProjectAdmin.ActionNames.EditRelease, MVC.ProjectAdmin.Name, new { projectName = ViewData["ProjectName"].ToString(), releaseName = item.Name }, new { @class = "button" })
</td>

</tr>
}
</tbody>
</table>
</div>
@Html.ActionLink("Dodaj nowy", MVC.ProjectAdmin.ActionNames.CreateRelease, MVC.ProjectAdmin.Name, new { projectName = ViewData["ProjectName"].ToString() }, new { @class="button", @title="Dodaj nową wersje"})


</div>
<div class="clear">
</div>
